CPP=server.cpp client.cpp

FLAG= -fPIC -shared
CFLAG= -c ${FLAG}
GPP= g++ -g

OBJ=simplesock.o client.o server.o


.PHONY:ALL
all:client server

HEAD= -I../

LIB= -L../ -lsimplesock -lconnectpool

server: server.o
	${GPP} $<  ${HEAD} ${LIB}  -Wl,-rpath,../ -o $@
	-rm -f *.o
client: client.o
	${GPP} $< ${HEAD}  -Wl,-rpath,../ ${LIB} -o $@

.cpp.o:
	${GPP} $(CFLAG) $< ${HEAD}  -o $@


clean:
	-rm -f *.o
	-rm -f client
	-rm -f server
